/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.acmwustl.bubble.gui.keyboards;

import javax.swing.JTextField;
import org.acmwustl.bubble.controllers.VirtualKeyboardInterface;

/**
 *
 * @author officer
 */
public class OnScreenTextField extends JTextField
implements VirtualKeyboardInterface{

    public OnScreenTextField() {
        super();
    }

    public void receieveCharacter(char c) {
        if(Character.isLetter(c) || c == ' ')
            this.setText(this.getText() + c);
        else if(c == '<')
            this.setText(this.getText().substring(0,this.getText().length()-1));
    }
}
